# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kuserfeedback
pkgver=1.2.0
pkgrel=1
pkgdesc="Framework for collecting user feedback for applications via telemetry and surveys"
url="https://kde.org/products/frameworks/"
arch="all !armhf"
license="MIT"
depends_dev="
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtsvg-dev
	qt5-qttools-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-dev $pkgname-lang"
source="https://download.kde.org/stable/kuserfeedback/kuserfeedback-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	# openglinfosourcetest requires OpenGL
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -E "openglinfosourcetest"
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
0152233c741a287b623256cac6d109d405441f17dec68c5782d900ddb9ca5a93614d46ea112e1be9e64913cc3f46d107bec64cad4579b766919439b0ed88a470  kuserfeedback-1.2.0.tar.xz
"
